SFTP Functionality

Note: This instruction is for Windows Agent version 4.0.1 and later.

You may need to configure the Host Public Key algorithm definition if you see this or similar message in the Agent log files:

Example: "Protocol Error: Host Key Algorithm Mismatch: [...]"

To use the Agent with a non-standard SFTP server configuration, follow these steps:

  1. Create an sftp.json file. The Agent locates the SFTP configuration file:

    1. In the tagent.ini and gather relevant information.

    2. In the Agent location folder.

      If you have installed and configured Agent as follows:

      The file location is {Path}\{AGENT}\sftp.json.

      Example: c:\Program Files\TIDAL\Agent\TIDAL_AGENT_1\sftp.json.

    3. In the bin directory of the Agent, the same directory where TidalAgent.exe file is located. By default, this directory is

      "c:\Program Files\TIDAL\Agent\Bin\TidalAgent.exe"

      or

      "c:\ Program Files (x86)\TIDAL\Agent\Bin\TidalAgent.exe" 
  1. Update the file content as follows:

    Note: The content in the sftp.json file is case-sensitive.

    {
     "Default": "{ALGORITHM}",
     "Hosts": [
     {
       "Host": "{SFTP_SERVER_NAME}",
       "Port": {PORT_NUMBER},
       "Algorithm": "{ALGORITHM}"
      },
    ….
      {
       "Host": " SFTP_SERVER_NAME_N",
       "Port": {PORT_NUMBER},
       "Algorithm": "{ALGORITHM}"
      }
     ]
    }

    Where

    Default – The default algorithm definition. This algorithm will be applied by default to ALL SFTP server for a specific Agent. This parameter is optional. See the list of available algorithms below.

    Hosts – The list of available SFTP servers. The Agent can connect to several SFTP servers each with its own algorithm configuration. Each server is identified by "{HOST} + {PORT_NUMBER}". If the file contains multiple definitions for the same SFTP address, the first occurrence definition will be used. This parameter is optional, and you can define as many servers as you need. Although there is no limitation on the number of the server definitions, we recommend to keep it under 100 per file.

    Note: User may use either Hosts or Default definitions, or both.

    Host – The Server Name or the IP Address. This parameter is required.

    Port – The SFTP Port number. It should be in the range of 1 to 65535. This parameter is optional. If no port is set, the default is 22.

    Algorithm – The Algorithm name. This parameter is required.

    List of available algorithms:

    • DSA – DSA public key algorithm

    • RSA – RSA public key algorithm

    • ECDSAsha2Nistp256 – Elliptic Curve Diffie-Hellman with nistp256 public key algorithm

    • ECDSAsha2Nistp384 – Elliptic Curve Diffie-Hellman with nistp384 public key algorithm

    • ECDSAsha2Nistp521 – Elliptic Curve Diffie-Hellman with nistp521 public key algorithm

    • RSA_sha2_256 – Elliptic Curve Diffie-Hellman with nistp521 public key algorithm

    • RSA_sha2_512 – Elliptic Curve Diffie-Hellman with nistp521 public key algorithm

    • Ed25519 – Ed25519 public key algorithm

    • ALL – All public key algorithms enable. Algorithm usage will be dynamically calculated.

    • AllPreferRSA – All public key algorithms are enabled, with a preference for RSA. If the SFTP server supports RSA algorithm, it will be used by default.

Note: The new Agent has changed Host key algorithm usage priorities from: ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-dss,rsa-sha2-256,rsa-sha2-512 to ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss.

Note: While selecting the algorithm, the chosen algorithm will be recorded in the log file: Decided hostkey alg. When the agent starts, the log shows "SFTPCONFIGFILE set to" followed by the path to the configuration file. If there's an error, the log shows "Exception reading, SFTPCONFIGFILE value".

If you encounter any issues and want to revert to the previous behavior:

  1. Create an sftp.json file.

  2. Update it as follows:

{
 "Default": " AllPreferRSA"
}